<!--
 * @FilePath     : /study_code/wangEditor/12-2.html
 * @Description  : `editor.getAllMenuKeys()` 获取所有默认菜单项
 * @Date         : 2025-04-20 22:07:18
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-20 22:15:10
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="/@wangeditor/editor/dist/css/style.css" />
    <link rel="stylesheet" href="/wangEditor/common/style.css" />
  </head>
  <body>
    <div id="editor—wrapper">
      <div id="toolbar-container"><!-- 工具栏 --></div>
      <div id="editor-container"><!-- 编辑器 --></div>
    </div>

    <script src="/@wangeditor/editor/dist/index.js"></script>
    <script>
      const { createEditor, createToolbar } = window.wangEditor

      const editorConfig = {
        placeholder: 'Type here...',
      }

      const editor = createEditor({
        selector: '#editor-container',
        html: '<p>hello <strong>world</strong></p>',
      })

      const toolbarConfig = {}

      const toolbar = createToolbar({
        editor,
        selector: '#toolbar-container',
      })
      // 获取默认配置，见 ./default.js
      var allMenuKeys = editor.getAllMenuKeys()

      console.log(1, '获取所有默认已注册菜单 key', allMenuKeys)
    </script>
  </body>
</html>
